﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<DVSProject.Models.SetupMachineModels>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>
    <div class="CSSTableGenerator">
    <table>
        <tr>
            <th></th>
            <th>
                LocationSetCode
            </th>
            <th>
                SetupDate
            </th>
            <th>
                ModelId
            </th>
            <th>
                Temp
            </th>
            <th>
                SerialNo
            </th>
            <th>
                StartMeter
            </th>
            <th>
                EndMeter
            </th>
            <th>
                TotalMeter
            </th>
            <th>
                RentBasic
            </th>
            <th>
                Remark
            </th>
            <th>
                Status
            </th>
            <th>
                CreateBy
            </th>
            <th>
                CreateOn
            </th>
            <th>
                UpdateBy
            </th>
            <th>
                UpdateOn
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
               <%-- <%= Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) %> |
                <%= Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ })%> |
                <%= Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })%>--%>
                 <%= Html.ActionLink("Change", "Change", new {id=item.LocationSetCode })%>
            </td>
            <td>
                <%= Html.Encode(item.LocationSetCode) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.SetupDate)) %>
            </td>
            <td>
                <%= Html.Encode(item.ModelId) %>
            </td>
            <td>
                <%= Html.Encode(item.Temp) %>
            </td>
            <td>
                <%= Html.Encode(item.SerialNo) %>
            </td>
            <td>
                <%= Html.Encode(item.StartMeter) %>
            </td>
            <td>
                <%= Html.Encode(item.EndMeter) %>
            </td>
            <td>
                <%= Html.Encode(item.TotalMeter) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.RentBasic)) %>
            </td>
            <td>
                <%= Html.Encode(item.Remark) %>
            </td>
            <td>
                <%= Html.Encode(item.Status) %>
            </td>
            <td>
                <%= Html.Encode(item.CreateBy) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.CreateOn)) %>
            </td>
            <td>
                <%= Html.Encode(item.UpdateBy) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.UpdateOn)) %>
            </td>
        </tr>
    
    <% } %>

    </table></div>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

